package ${config.basePackage};

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;

<#if (file.imports)??>
<#list file.imports as import>
import ${import};
</#list>
</#if>

/**
* <p>
*
* </p>
*
* @author ${(config.author)!''}
* @since ${.now?string("yyyy-MM-dd")}
*/
<#if (config.useLombok)??>
<#if config.useLombok>
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
</#if>
</#if>
<#if (config.useSwagger2)??>
<#if config.useSwagger2>
@ApiModel("文件实体类")
</#if>
</#if>
public class ${file.className} implements Serializable {

    private static final long serialVersionUID = 1L;

<#list file.fields as field>
    /**
     * ${field.remarks}
     */
    <#if (field.primaryKey)??>
    <#if field.primaryKey>
    @TableId(value = "${field.fieldName}", type = IdType.AUTO)
    </#if>
    </#if>
    <#if !field.haveUnderLine>
    @TableId(value = "${field.fieldName}")
    </#if>
    <#if config.useSwagger2>
    @ApiModelProperty(value = "${field.remarks}", dataType = "${field.dataType}", example = "0")
    </#if>
    private ${field.dataType} ${field.fieldName};

</#list>
}
